package com.guangfeng.yql.comm.netty;

import com.guangfeng.yql.comm.netty.initalizer.BaseInitializer;
import com.guangfeng.yql.comm.netty.initalizer.MessageInitializer;
import com.guangfeng.yql.comm.netty.verify.DataVerify;
import com.guangfeng.yql.comm.util.IPHelper;
import io.netty.channel.SimpleChannelInboundHandler;
import lombok.Data;

import java.util.List;

@Data
public class NettyProperty {

    private Integer port;
    private String ip;
    private String path;
    private Integer maxFrameSize;
    private Integer maxContentLength;
    private Class<? extends BaseInitializer<?>> init;
    private Class<? extends SimpleChannelInboundHandler<?>> handler;
    private List<Class<? extends DataVerify>> verify;

    public NettyProperty() {
        ip = IPHelper.getHostIp();
        maxFrameSize = 65535;
        maxContentLength = 1000;
        init = MessageInitializer.class;
    }

}
